#ifndef GAMEOVERDIALOG_H
#define GAMEOVERDIALOG_H

#include <QDialog>
#include <QPaintEvent>
#include "widget.h"
#include "startmenu.h"

namespace Ui {
class gameOverDialog;
}

class gameOverDialog : public QDialog
{
    Q_OBJECT

public:
    explicit gameOverDialog(QWidget *parent = nullptr);

    ~gameOverDialog();

    void paintEvent(QPaintEvent *event)
    {
        QPainter painter(this);
        // 背景图片
        painter.drawPixmap(0,0,width(),height(),QPixmap("D:/QT/Projects/snakepro/rsc/gameover.jpg"));
        // 窗口背景色
        //    painter.setBrush(Qt::black);
        //    painter.drawRect(this->rect());
    }

private slots:
    void on_restart_clicked();

    void on_return_2_clicked();

private:
    Ui::gameOverDialog *ui;
};

#endif // GAMEOVERDIALOG_H
